﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Page/MasterPage.master" AutoEventWireup="true"
    CodeFile="AddNews.aspx.cs" Inherits="Page_AddNews" ValidateRequest="false" %>

<%@ Register Src="UserControl/ContentHeader.ascx" TagName="ContentHeader" TagPrefix="uc1" %>
<%@ Register Src="UserControl/Message.ascx" TagName="Message" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript" src="../tiny_mce/tiny_mce.js"></script>
    <script src="../App_Themes/js/mceUpload.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%= TextBox_PublishDate.ClientID %>").datepicker();
        });
    </script>
    <script type="text/javascript">
        function setFontsReinit(instance) {
            var inst = tinyMCE.selectedInstance;
            var editorId = inst.editorId;
            tinyMCE.execInstanceCommand(editorId, 'fontname', false, "tahoma");
        }    
    </script>
    <script type="text/javascript">
        tinyMCE.init({
            valid_elements: "@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|"
+ "onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|"
+ "onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|"
+ "name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,"
+ "#p,-ol[type|compact],-ul[type|compact],-li,br,br[clear],img[longdesc|usemap|"
+ "src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,"
+ "-blockquote,-table[border=0|cellspacing|cellpadding|width|frame|rules|"
+ "height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|"
+ "height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,"
+ "#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor"
+ "|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,div,"
+ "-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face"
+ "|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],"
+ "object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width"
+ "|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,"
+ "button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|"
+ "valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],"
+ "input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],"
+ "kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],"
+ "q[cite],samp,select[disabled|multiple|name|size],small,"
+ "textarea[cols|rows|disabled|name|readonly],tt,var,big,"
+ "iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder]",
            force_br_newlines: true,


            // General options
            mode: "textareas",
            theme: "advanced",
            editor_selector: "textAreaMceAdvance",
            plugins: "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
            language: "en",

            // Theme options		
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
            theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,forecolor,backcolor,image,media,|,outdent,indent,undo,redo,link,unlink,anchor,cleanup",
            theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,advhr,|,fullscreen,code,preview",
            //theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
            theme_advanced_buttons3_add: "ibrowser",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_statusbar_location: "bottom",
            //theme_advanced_resizing: true,
            theme_advanced_resizing: false,

            // Example content CSS (should be your site CSS)
            content_css: "../App_Themes/frontends/css/style.css",

            // Drop lists for link/image/media/template dialogs
            template_external_list_url: "lists/template_list.js",
            external_link_list_url: "lists/link_list.js",
            external_image_list_url: "lists/image_list.js",
            media_external_list_url: "lists/media_list.js",
            //theme_advanced_default_font: "[arial|13] ",

            // Style formats
            style_formats: [
			{ title: 'Bold text', inline: 'b' },
			{ title: 'Red text', inline: 'span', styles: { color: '#ff0000'} },
			{ title: 'Red header', block: 'h1', styles: { color: '#ff0000'} },
			{ title: 'Example 1', inline: 'span', classes: 'example1' },
			{ title: 'Example 2', inline: 'span', classes: 'example2' },
			{ title: 'Table styles' },
			{ title: 'Table row 1', selector: 'tr', classes: 'tablerow1' }
		],
            //URL relative
            relative_urls: false,
            remove_script_host: true,
            init_instance_callback: "setFontsReinit",
            //document_base_url: "http://vtcportal.com/",

            // Replace values for the template plugin
            template_replace_values: {
                username: "Some User",
                staffid: "991234"
            }
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <uc1:ContentHeader ID="ContentHeader1" PageTitle="Adding/Updating News" GoToLabel="News List Management"
        GoToLink="NewsManagement.aspx" runat="server" />
    <div class="body_content">
        <uc2:Message ID="Message_Alert" runat="server" />
        <div class="formrow">
            <label class="lb_large fl right">
                <span class="important">*</span><%= Resources.News.Category%></label>
            <div class="form_field fl">
                <asp:DropDownList ID="DropDownList_Category" CssClass="select" runat="server">
                </asp:DropDownList>
            </div>
            <label class="lb fl">
                <span class="important">*</span><%= Resources.News.NewsTitle%></label>
            <div class="form_field fl">
                <asp:TextBox ID="TextBox_NewsTitle" runat="server" CssClass="textbox" Width="312"
                    MaxLength="300"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                        runat="server" ErrorMessage="*" ControlToValidate="TextBox_NewsTitle" ValidationGroup="input"></asp:RequiredFieldValidator>
            </div>
            <div class="clr">
            </div>
        </div>
        <div class="formrow">
            <label class="lb_large fl right">
                <span class="important">*</span><%= Resources.News.Avatar%></label>
            <div class="form_field fl">
                <div class='fl filetype'>
                    <asp:FileUpload CssClass="file fileupload" ID="FileUpload_Avartar" runat="server" />
                </div>
            </div>
            <div class="form_field fl">
                <label class="lb fl">
                    <span class="important">*</span><%= Resources.News.TopSliderImage%></label>
                <div class='fl filetype'>
                    <asp:FileUpload CssClass="file fileupload" ID="FileUpload_Slider" runat="server" />
                </div>
            </div>
            <div class="clr">
            </div>
        </div>
        <div class="formrow">
            <div style="width: 50%">
                <label class="lb_large fl right">
                    <span class="important"></span>
                    <%= Resources.News.ExternalLinkforMovie%></label>
                <div class="form_field fl">
                    <asp:TextBox ID="TextBox_External" runat="server" TextMode="MultiLine" CssClass="textarea_medium"
                        MaxLength="400" Height="158" Width="300px"></asp:TextBox>
                </div>
            </div>
            <div class="fl" style="width: 49%; padding-left: 5px">
                <fieldset style="border: 1px solid #BDC7D8; width: 45%; font-family: Arial, Helvetica, sans-serif;
                    font-weight: bold">
                    <legend style="font-size: 12px; color: #5A5A5A">Movie extension only</legend>
                    <div class="formrow">
                        <label class="lb_small fl right">
                            <span class="important"></span>
                            <%= Resources.News.Section%>:</label>
                        <div class="form_field fl">
                            <asp:TextBox ID="TextBox_Section" rel='uint' runat="server" CssClass="textbox_smaller"></asp:TextBox>
                        </div>
                        <div class="clr">
                        </div>
                    </div>
                    <div class="formrow">
                        <label class="lb_small fl right">
                            <span class="important"></span>
                            <%= Resources.News.Part%>:</label>
                        <div class="form_field fl">
                            <asp:TextBox ID="TextBox_Part" MaxLength="200" runat="server" CssClass="textbox_smaller"></asp:TextBox>
                        </div>
                        <div class="clr">
                        </div>
                    </div>
                    <div class="formrow">
                        <label class="lb_small fl right">
                            <span class="important"></span>
                            <%= Resources.News.Duration%>:</label>
                        <div class="form_field fl">
                            <asp:TextBox ID="TextBox_Duration" MaxLength="200" runat="server" CssClass="textbox_smaller"></asp:TextBox>
                        </div>
                        <div class="clr">
                        </div>
                    </div>
                    <div class="formrow">
                        <label class="lb_small fl right">
                            <span class="important"></span>
                            <%= Resources.News.CovertAffair%>:</label>
                        <div class="form_field fl">
                            <asp:TextBox ID="TextBox_Private" MaxLength="200" runat="server" CssClass="textbox_smaller"></asp:TextBox>
                        </div>
                        <div class="clr">
                        </div>
                    </div>
                    <div class="formrow">
                        <label class="lb_small fl right">
                            <span class="important"></span>
                            <%= Resources.News.MovieKeyword%>:</label>
                        <div class="form_field fl">
                            <asp:TextBox ID="TextBox_MovieKeyword" MaxLength="200" runat="server" CssClass="textbox_smaller"></asp:TextBox>
                        </div>
                        <div class="clr">
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="clr">
            </div>
        </div>
       <%-- <div class="formrow">
            <label class="lb_large fl right">
                <span class="important"></span>
                <%= Resources.News.MovieStyle%></label>
            <div class="form_field fl">
                <asp:DropDownList ID="DropDownList_MovieStyle" CssClass="select" runat="server">
                </asp:DropDownList>
            </div>
            <div class="clr">
            </div>
        </div>--%>
        <div class="formrow">
            <label class="lb_large fl right">
                <span class="important">*</span><%= Resources.News.Description%></label>
            <div class="form_field fl">
                <asp:TextBox ID="TextBox_Description" TextMode="MultiLine" Height="30" Width="595"
                    runat="server" CssClass="textarea_medium" MaxLength="450"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                    ControlToValidate="TextBox_Description" ValidationGroup="input"></asp:RequiredFieldValidator>
            </div>
            <div class="clr">
            </div>
        </div>
        <div class="formrow">
            <label class="lb_large fl right">
                <span class="important">*</span><%= Resources.News.Detail%></label>
            <div class="form_field fl">
                <asp:TextBox runat="server" CssClass="textAreaMceAdvance" TextMode="MultiLine" ID="TextBox_Details"
                    Width="600" Height="400"></asp:TextBox>
            </div>
            <div class="clr">
            </div>
        </div>
        <div class="formrow">
            <label class="lb_large fl right">
                <span class="important"></span>
                <%= Resources.News.ShowOnHomePage%></label>
            <div class="form_field fl">
                <div class="form_field fl">
                    <asp:CheckBox ID="CheckBox_ShowOnHomePage" CssClass="checkbox" runat="server" />
                </div>
            </div>
            <label class="lb fl">
                <span class="important"></span>
                <%= Resources.News.DisplayOnHomepagePosition%></label>
            <div class="form_field fl">
                <div class="form_field fl">
                    <asp:DropDownList ID="DropDownList_HomePagePosition" CssClass="select" runat="server">
                    </asp:DropDownList>
                </div>
            </div>
            <div class="clr">
            </div>
        </div>
        <div class="formrow">
            <div class="clr">
            </div>
        </div>
        <div class="formrow">
            <label class="lb_large fl right">
                <span class="important">*</span><%= Resources.News.DisplayOnSubpagePosition%></label>
            <div class="form_field fl">
                <div class="form_field fl">
                    <asp:DropDownList ID="DropDownList_SubPagePosition" CssClass="select" runat="server">
                    </asp:DropDownList>
                </div>
            </div>
            <div class="clr">
            </div>
        </div>
        <div class="formrow">
            <label class="lb_large fl right">
                <span class="important">*</span><%= Resources.News.PublishDate%></label>
            <div class="form_field fl">
                <asp:TextBox ID="TextBox_PublishDate" runat="server" CssClass="textbox_smaller"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*"
                    ControlToValidate="TextBox_PublishDate" ValidationGroup="input"></asp:RequiredFieldValidator>
            </div>
            <div class="clr">
            </div>
        </div>
        <div class="formrow">
            <label class="lb_large fl right">
                <span class="important">*</span><%= Resources.News.Active%></label>
            <div class="form_field fl">
                <asp:CheckBox ID="CheckBox_IsAcitve" Checked="true" CssClass="checkbox" runat="server" />
            </div>
            <div class="clr">
            </div>
        </div>
        <div class="formrow">
            <label class="lb_large fl right">
                <span class="important"></span>
            </label>
            <div class="form_field fl">
                <asp:Button ValidationGroup="input" ID="Button_Save" CssClass="button" runat="server"
                    Text="Save" OnClick="Button_Save_Click" />
            </div>
            <div class="clr">
            </div>
        </div>
    </div>
</asp:Content>
